/*
 * consolelogger.h
 *
 *  Created on: Jan 10, 2012
 *      Author: sihai
 */

#ifndef CONSOLELOGGER_H_
#define CONSOLELOGGER_H_

class ConsoleLogger : public Logger
{
	private:
			int fd;
			int buffersize;
			int position;
			char* buffer;
			pthread_mutex_t mutex;
	private:
			void log(const char* msg);
			void append(const char* msg);
			void _flush();
	public:
			ConsoleLogger(int buffersize = 0);
			~ConsoleLogger();
			bool init();
};

#endif /* CONSOLELOGGER_H_ */
